Mixing the repository and checkouts is discouraged.
src/libostree/ostree-core.h \
src/libostree/ostree-repo.c \
src/libostree/ostree-repo.h \
- src/libostree/ostree-types.h \
$(NULL)
libostree_la_CFLAGS = -I$(srcdir)/src/libostree -I$(srcdir)/src/libotutil -DLOCALEDIR=\"$(datadir)/locale\" $(GIO_UNIX_CFLAGS)
libostree_la_LIBADD = libotutil.la $(GIO_UNIX_LIBS)
g_assert (priv->path != NULL);
priv->repo_file = ot_util_new_file_for_path (priv->path);
- priv->head_ref_path = g_build_filename (priv->path, OSTREE_REPO_DIR, "HEAD", NULL);
- priv->objects_path = g_build_filename (priv->path, OSTREE_REPO_DIR, "objects", NULL);
+
+ priv->head_ref_path = g_build_filename (priv->path, "HEAD", NULL);
+ priv->objects_path = g_build_filename (priv->path, "objects", NULL);
return object;
}
+++ /dev/null
-/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
- *
- * Copyright (C) 2011 Colin Walters <walters@verbum.org>.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * Author: Colin Walters <walters@verbum.org>
- */
-
-#ifndef __OSTREE_TYPES_H__
-#define __OSTREE_TYPES_H__
-
-#include <gio/gio.h>
-
-G_BEGIN_DECLS
-
-#define OSTREE_REPO_DIR ".ot"
-
-G_END_DECLS
-
-#endif
#include <ostree-core.h>
#include <ostree-repo.h>
-#include <ostree-types.h>
#endif
{
GOptionContext *context = NULL;
gboolean ret = FALSE;
- char *htdir_path = NULL;
+ char *otdir_path = NULL;
char *objects_path = NULL;
- GFile *htdir = NULL;
+ GFile *otdir = NULL;
GFile *objects_dir = NULL;
- context = g_option_context_new ("- Check the repository for consistency");
+ context = g_option_context_new ("- Initialize a new empty repository");
g_option_context_add_main_entries (context, options, NULL);
if (!g_option_context_parse (context, &argc, &argv, error))
if (repo_path == NULL)
repo_path = ".";
- htdir_path = g_build_filename (repo_path, OSTREE_REPO_DIR, NULL);
- htdir = ot_util_new_file_for_path (htdir_path);
-
- if (!g_file_make_directory (htdir, NULL, error))
- goto out;
-
- objects_path = g_build_filename (htdir_path, "objects", NULL);
+ objects_path = g_build_filename (repo_path, "objects", NULL);
objects_dir = g_file_new_for_path (objects_path);
if (!g_file_make_directory (objects_dir, NULL, error))
goto out;
out:
if (context)
g_option_context_free (context);
- g_free (htdir_path);
- g_clear_object (&htdir);
+ g_free (otdir_path);
+ g_clear_object (&otdir);
return ret;
}